package com.dyzx.hbb.modules.sys.service;


import com.dyzx.hbb.common.base.PageResult;
import com.dyzx.hbb.modules.sys.entity.SysUser;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dyzx.hbb.modules.sys.query.UserQuery;
import com.dyzx.hbb.modules.sys.vo.UserVO;
import com.dyzx.hbb.security.model.SysUserInfo;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;

import java.util.List;
import java.util.Set;

/**
* @author Administrator
* @description 针对表【sys_user(用户表)】的数据库操作Service
* @createDate 2025-04-14 13:29:08
*/
public interface SysUserService extends IService<SysUser> {

    SysUser getByAccount(String username);

    List<String> getMenuPermissions(Long id);

    PageResult<SysUser> findByPage(UserQuery query);

    boolean validateSmsCode(@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确") String phone, @NotBlank(message = "验证码不能为空") String smsCode);

    void sendNewPassword(@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确") String phone,  String newPassword);

    SysUser getByPhone(@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确") String phone);

    SysUserInfo getLoginUserInfo(Long userId);

    List<Long> findByOrganIds(List<String> list);
    List<Long> findByDeptIds(List<String> list);
}
